
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit" />
    <meta name="robots" content="index, follow" />
    <link rel="stylesheet" type="text/css" href="qtimages/css/font-awesome.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="qtimages/css/bootstrap.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="qtimages/css/owl.carousel.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="qtimages/css/magnific-popup.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="qtimages/css/animate.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="qtimages/css/settings.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="qtimages/css/style-red.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="qtimages/css/tk.css" media="screen" />
    <script type="text/javascript" src="qtimages/js/jquery.min.js"></script>
    <script type="text/javascript" src="qtimages/js/jquery.migrate.js"></script>
    <script type="text/javascript" src="qtimages/js/bootstrap.js"></script>
    <script type="text/javascript" src="qtimages/js/owl.carousel.min.js"></script>
    <script type="text/javascript">
        $(function() {
            $("#navigation #nav_0 .menu1").addClass("active");
        });
    </script>
    <link rel="stylesheet" href="./qtimages/sl_common_form.css">
    <title>竞赛信息</title>
</head>
<body>
<div id="wrapper">
<div id="container">
    <script src="qttop.js"></script>
    <script src="bht.js"></script>
    <div id="content">

    <div class="section-content team-section2 no-padd" id="index-news">
        <div class="title-section title2">
            <div class="container triggerAnimation animated" data-animate="bounceIn">
                <h1>竞赛信息</h1>
            </div>
        </div>
        <div class="team-box">
            <div class="container">
                <div class="row">
                    <div class="content-form">

						<div style="margin-top: 10px">
								<div style="border: 1px solid #ff6b31;">
									<div style="padding: 5px; border-bottom: 1px solid #ff6b31; color: white; background-color: #ff6b31;">竞赛信息</div>
									<div style="border: 1px solid #ccc; padding: 10px">
										<div class="table-responsive">
											<div class="nx-table-header" style="position: relative">

												<input type="text" placeholder="请输入搜索内容" v-model="name"  style="width:350px; height:40px;  "@keyup.enter="loadTable(1)">
												<i class="glyphicon glyphicon-search" style="margin-left: -20px"></i>
											 
											</div>
											<br>
											<table class="table table-striped table-bordered table-hover">
												<thead>
												<tr>
													<th >赛事名称</th>
                                                    <th >图片</th>
                                                    <th >赛事地点</th>
                                                    <th >赛事时间</th>
                                                    <th >报名费</th>
                                                    <th >参赛要求</th>
    
    
													<th>操作</th>
												</tr>
												</thead>
												<tbody v-for="obj in objs">
												<tr>
													<td>{{obj.saishimingcheng}}</td>
                                                <th><img v-if="obj.tupianavt" :src="'/files/download/'+obj.tupianavt" class="avatar-table"><img v-else src="../end/img/no-avater.jpg" class="avatar-table"></th>
                                                <td>{{obj.saishididian}}</td>
                                                    <td>{{obj.saishishijian}}</td>
                                                <td>{{obj.baomingfei}}</td>
                                                    <td>{{obj.cansaiyaoqiu}}</td>

													<td>
														<button class="btn btn-primary btn-xs" @click="detail(obj.id)">详细</button>                                </td>
												</tr>
												</tbody>
											</table>
											<!--danhxexiaxnshi-->
											<nav aria-label="Page navigation example">
												<ul class="pagination">
													<li class="page-item" v-bind:class="{ disabled: preActive }">
														<a class="page-link" href="javascript:void(0)"
														   v-on:click="loadTable(pageInfo.pageNum - 1)">上一页</a>
													</li>
													<li class="page-item">
														<a class="page-link" href="javascript:void(0)" v-if="pageInfo.pageNum > 1" v-on:click="loadTable(pageInfo.pageNum - 1)">{{pageInfo.pageNum - 1}}</a>
													</li>
													<li class="page-item disabled">
														<a class="page-link" aria-disabled="true" href="javascript:void(0)">{{pageInfo.pageNum}}</a>
													</li>
													<li class="page-item">
														<a class="page-link" href="javascript:void(0)" v-if="pageInfo.hasNextPage" v-on:click="loadTable(pageInfo.pageNum + 1)">{{pageInfo.pageNum + 1}}</a>
													</li>
													<li class="page-item" v-bind:class="{ disabled: nextActive }">
														<a class="page-link" href="javascript:void(0)" v-on:click="loadTable(pageInfo.hasNextPage? (pageInfo.pageNum + 1) : pageInfo.pageNum)">下一页</a>
													</li>
												</ul>
											</nav>
										</div>
									</div>
								</div>
							</div>
						
                    </div>
                </div>
            </div>
        </div>
    </div>
        <script src="sidebufen.js"></script>
</div>
<script src="qtdown.js"></script></div>
<script type="text/javascript" src="qtimages/js/jquery.magnific-popup.min.js"></script>
<script type="text/javascript" src="qtimages/js/jquery.appear.js"></script>
<script type="text/javascript" src="qtimages/js/jquery.imagesloaded.min.js"></script>
<script type="text/javascript" src="qtimages/js/jquery.isotope.min.js"></script>
<script type="text/javascript" src="qtimages/js/retina-1.1.0.min.js"></script>
<script type="text/javascript" src="qtimages/js/plugins-scroll.js"></script>
<script type="text/javascript" src="qtimages/js/waypoint.min.js"></script>
<script type="text/javascript" src="qtimages/js/jquery.themepunch.tools.min.js"></script>
<script type="text/javascript" src="qtimages/js/jquery.themepunch.revolution.min.js"></script>
<script type="text/javascript" src="qtimages/js/script.js"></script>
<link type="text/css" rel="stylesheet" href="qtimages/css/jquery.mmenu.all.css" />
<script type="text/javascript" src="qtimages/js/jquery.mmenu.all.min.js"></script>
<script type="text/javascript">
    jQuery(document).ready(function($) {
        var mmenu = $('nav#mmenu').mmenu({
            slidingSubmenus: true,
            classes: 'mm-white',
            //mm-fullscreen mm-light
            extensions: ["theme-white"],
            offCanvas: {
                position: "right",
                //left, top, right, bottom
                zposition: "front" //back, front,next
                //modal		: true
            },
            searchfield: false,
            counters: false,
            //navbars		: {
            //content : [ "prev", "title", "next" ]
            //},
            navbar: {
                title: "网站导航"
            },
            header: {
                add: true,
                update: true,
                title: "网站导航"
            }
        });
        $(".closemenu").click(function() {
            var mmenuAPI = $("#mmenu").data("mmenu");
            mmenuAPI.close();
        });
    });
</script>
<!--daipxingxlun-->
</div>
<script src="js/swiper-5.4.5/swiper.min.js"></script>
<script src="js/vue2.6.11/axios.js"></script>
<script src="js/vue2.6.11/vue.min.js"></script>
<script src="js/my.js"></script>
<link rel="stylesheet" href="css/common.css">
<link rel="stylesheet" href="css/nav.css">
<link rel="stylesheet" href="css/font-awesome.css">
<link rel="stylesheet" href="css/element/index.css">
<link rel="stylesheet" href="css/hsg.css">
<script>
	new Vue({
		el: '#wrapper',
		data: {
			authority: [],
			permission: [],
			storeUser: JSON.parse(localStorage.getItem("user")),
			name: '',
			// gonghao: '',
			//xingming:'',
			user: {},
			searchText: null,
		
tupianimrl: '',
//youtupianimrl			
			objs: [],
			pageInfo: {},
			preActive: true,
			nextActive: true,
			isShow: false,
tupianavt:null,
//youtupianavt			
			entity: {

			}
		},
		created: function () {
			axios.get('/auth').then(res => {
				if (res.data.code === '0') {
					this.user = res.data.data;
				}
			});
			
			this.loadTable(1);
		},
		methods: {
			loadTable(pageNum) {
				let name = this.name === '' ? "all" : this.name;
				axios.get("/jingsaixinxiInfo/pageqt/" + name + "?pageNum=" + pageNum).then(res => {
					if (res.data.code === '0') {
						this.objs = res.data.data.list;
						res.data.data.list.forEach(item=>{
							//if(item.zhaopian) {item.zhaopianavt = JSON.parse(item.zhaopian)[0];}
							if(item.tupian) {item.tupianavt = JSON.parse(item.tupian)[0];}
                            //tupianloadtb
							//dhjsuanxx
						})
						this.pageInfo = res.data.data;
						this.preActive = !(this.pageInfo.hasPreviousPage);
						this.nextActive = !(this.pageInfo.hasNextPage);
					} else {
						msg('error', res.data.msg);
					}
				});
			},
			searchShangpinxinxi(text) {   // 根据关键字查询
				if(text) {
					location.href = '/front/jingsaixinxilisttp.html?text=' + text;
				}else {
					location.href = '/front/jingsaixinxilisttp.html';
				}
			},
			detail(id){
				window.location = "jingsaixinxidetail.html?jingsaixinxiid="+id;
			},
			qiehuanshitu()
			{
				window.location = "jingsaixinxilisttp.html";
			},
			tupiansccs(res, file) {
                this.tupianimrl = URL.createObjectURL(file.raw);
                this.entity.tupianflst.push(res.data.id);
                this.tupianavt = res.data.id
            },
            tupianbaul(file) {
                this.entity.tupianflst = [];
                const isJPG = file.type === 'image/jpeg';
                const isLt2M = file.size / 1024 / 1024 / 1024 < 2;

                if (!isJPG) {
                    this.$message.error('上传头像图片只能是 JPG 格式!');
                }
                if (!isLt2M) {
                    this.$message.error('上传头像图片大小不能超过 2000MB!');
                }
                return isJPG && isLt2M;
            },
			//m_tupiansccsbaul
			logout() {
				axios.get("/logout").then(res => {
					if(res.data.code === '0') {
						location.href = '/front/index.html';
					} else {
						msg('error', res.data.msg);
					}
				})
			}
		}
	})
</script>
</body>
</html>
